package com.example.brodcastreception0220;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Switch;
import android.widget.Toast;

public class myreceiver extends BroadcastReceiver {
    private static final String TAG = myreceiver.class.getSimpleName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action=intent.getAction();
        switch (action){
            case Intent.ACTION_BOOT_COMPLETED:
                Toast.makeText(context,"收到开机广播------------",Toast.LENGTH_LONG).show();
        }
    }
}
